package bpce;

import java.awt.Color;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;

import javax.swing.BoxLayout;
import javax.swing.JFrame;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;

/**
 * @author Michele Machado
 * 
 * 
 */
/**
 * @author Administrador
 * 
 */
public class BPCEWindow extends JFrame implements ActionListener,
		 WindowListener {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 858328820458791293L;

	/**
	 * Textarea do Log.
	 */
	private JTextArea logTextArea;

	/**
	 * Area de scroll do Log.
	 */
	private JScrollPane scrollLog;

	public BPCEWindow() {

		setSize(500, 600);
		try {
			// Inicializa os componentes visuais da janela.
			BoxLayout thisLayout = new BoxLayout(getContentPane(),
					javax.swing.BoxLayout.Y_AXIS);
			getContentPane().setLayout(thisLayout);
			this.setFocusCycleRoot(false);
			{
				scrollLog = new JScrollPane();
				getContentPane().add(scrollLog);
				{
					logTextArea = new JTextArea();
					scrollLog.setViewportView(logTextArea);
					logTextArea.setText("");
					logTextArea.setBackground(new Color(16, 12, 66));
					logTextArea.setForeground(new Color(151, 138, 255));
					logTextArea.setEditable(false);
					logTextArea.setColumns(30);
				}
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	public void actionPerformed(ActionEvent ev) {

	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see coppeer.examples.FPWebHandler#log(java.lang.String)
	 */
	public void log(String s) {
		logTextArea.append(s + "\n");
	}

	public void windowActivated(WindowEvent arg0) {

	}

	public void windowClosed(WindowEvent arg0) {

	}

	public void windowClosing(WindowEvent arg0) {

	}

	public void windowDeactivated(WindowEvent arg0) {

	}

	public void windowDeiconified(WindowEvent arg0) {

	}

	public void windowIconified(WindowEvent arg0) {

	}

	public void windowOpened(WindowEvent arg0) {

	}	
}